<?php
include "../mysql/mysql.php";
    $aa = new mysql;
    $aa->link("");
    include "../myfunction.php";
    $bb= new myfunction;



$q=@$_GET["q"]; 
$qq= explode("-", $q); 
$delid= $qq[0];
$adminname = $qq[1];

//var_dump($pw);
//var_dump($name);
$res = $bb->findmanageuser($adminname);
$rightconl = $res['right_control'];

if($rightconl == 1){
$sql = "DELETE FROM manage_info WHERE id='".$delid."'";
$result= $aa->excu($sql);

//var_dump($result);
if($result == 'TURE'){
	echo '该管理员已删除';
	}else{
		echo "删除管理员失败,请重试！";
		}
}
else{
	echo "您没有权限";
	}

include "../mysql/mysqlclose.php";
?>